<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新东方顶部导航菜单</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            list-style: none;
        }
        nav{
            background-image: url(img/top_bg.gif);
            background-repeat: repeat-x;
            vertical-align: middle;
            /* width: 610px; */
            position: relative;
            /* overflow: hidden; */
        }
        ul::after{
            clear: both;
            content: "";
            height: 0;
            display: block;
            visibility: hidden;
        }
        .head{
            line-height: 28px;
            /* border: 1px solid saddlebrown; */
            vertical-align: middle;
            font-weight: bold;
            /* overflow: hidden; */
        }
        .haednav{
            line-height: 22px;
            margin-top: 2px;
            float: left;
            margin-left: 20px;
            padding-right: 20px;
            font-size: 12px;
            color: rgba(0, 0, 0, .5);
            border-right: 1px dashed  rgba(0, 0, 0, .5);
            position: relative;
        }
        .first{
            float: left;
            padding-top: 0px;
            margin-right: 40px;
            
        }
        .last{
            border:0;
        }
        .pic{
            padding-bottom: 5px; 
        }
        .text{
            position: absolute;
            right: 10px;
            top: 10px;
            padding: 20px;
            width: 250px;
            font-size: 10px;
            line-height: 20px;
            display: none; 
        }
        span{
            display: inline-block;
            width: 50px;
            margin: 0 10px;
        }
        p{  
            padding-bottom: 10px;
            border-bottom: 1px dashed rgba(0, 0, 0, .5);
        }
        .f1{
            padding-top: 10px;
        }
        .f2{
            border: 0px;
            margin-bottom: -20px;
        }
        ul>.last:hover>.text{
            display: block;
        }

    </style>
</head>
<body>
    <nav class="nav">
        <ul class="head"> 
        <li class="first"><img src="img/logo.gif" alt=""></li>
        <li class="haednav">购物车</li>
        <li class="haednav">优惠券</li>
        <li class="haednav">快速注卡</li>
        <li class="haednav">各地购课</li>
        <li class="haednav">手机报</li>
        <li class="haednav last">网站导航
            <img src="img/open_icon.gif" alt="" class="pic">
            <div class="text">
                <p><span>托福</span><span>雅思</span><span>考研</span><span>职称英语</span><span>初中</span><span>日语</span></p>
                <p class="f1"><span>网络课堂</span><span>资讯中心</span><span>知识堂</span><span>大师讲坛</span><span>学习论坛</span><span>学词</span><span>考研搜校</span></p>       
                <p class="f1 f2"><span>M-Zone</span><span>手机报</span><span>时时英语</span></p>   
             </div></li>
        </ul>
         
    </nav>
</body>
</html>